package main

import (
	"encoding/json"
	"fmt"
	"os"
)

func main() {
	_, err2 := os.Stat("msp")
	if err2 != nil {
		fmt.Println(err2)
		return
	}
	err := os.Mkdir("msp", os.ModePerm)
	f, err := os.Create("msp/nginx.conf") //创建文件
	defer f.Close()
	if err != nil {
		fmt.Println("Error opening genesis.block ", err)
		return
	}
	data, err := json.Marshal("11111")
	_, err = f.Write(data)
	if err != nil {
		fmt.Println("Error write to file ", err)
		return
	}
	err = os.Mkdir("msp", os.ModePerm)
	if err != nil {
		fmt.Println(err)
		return
	}
	return
}
